package com.ai.module.business.controller;

import com.ai.module.business.domain.entity.CommentRecordEntity;
import com.ai.module.business.domain.req.CommentRecordReq;
import com.ai.module.business.service.CommentRecordService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author: MrHe
 * @create: 2024-01-25 02:13
 * @description:
 **/

@RestController
@RequestMapping("/comment/record")
@Api(tags = "用户评论记录")
public class CommentRecordController {

    @Autowired
    CommentRecordService commentRecordService;

    @PostMapping
    @ApiOperation("查询评论记录")
    public Page<CommentRecordEntity> findRecords(@RequestBody CommentRecordReq commentRecordReq){
        return commentRecordService.findRecords(commentRecordReq);
    }

    @PostMapping("save")
    @ApiOperation("保存评论记录")
    public void saveComment(@RequestBody CommentRecordReq commentRecordReq){
         commentRecordService.saveComment(commentRecordReq);
    }



}
